import turtle as t
太极半径 = R = 70
阴鱼 = 阳鱼 = r = R/2
鱼眼半径 = yang_circle_r = yin_circle_r = R/6
阴鱼眼圆心 = yin = (0,-2*R/3)
阳鱼眼圆心 = yang = (0,R/3)

八卦信息列表 = bagua = [	(1,1,0),#兑
						(0,0,0),#坤
						(1,0,1),#离
						(0,1,1),#巽
						(1,0,0),#震
						(0,0,1),#艮
						(0,1,0),#坎
						(1,1,1) #乾
					  ]
t.pensize(15)
for i in range(3):
	t.penup()
	t.seth(-67.5)
	t.fd(50*(i+2))
	t.pendown()
	t.seth(22.5)
	t.circle(50*(i+2),steps=8)
	t.pu()
	t.home()
	t.pd()
t.pencolor('white')
t.seth(22.5)
for i in range(8):
	t.fd(205)
	t.bk(205)
	t.rt(45)

t.seth(0)



def 阴爻():
	t.fd(50)
def 阳爻():
	t.pu()
	t.fd(50)
	t.pd()
def huagua(g):
	if g[0] == 1:
		阳爻()
	else:
		阴爻()
	if g[1] == 1:
		阳爻()
	else:
		阴爻()	
	if g[2] == 1:
		阳爻()
	else:
		阴爻()



for i in range(8):		
	

	t.fd(60)
	huagua(bagua[i])
	t.pu()
	t.home()
	t.pd()
	t.lt((i+1)*45)

t.pensize(1)
t.pencolor('black')
t.pu()
t.goto(0,-R)
t.seth(0)
t.pd()
t.fillcolor('black')
t.begin_fill()
t.circle(R,-180)
t.circle(r,-180)
t.circle(-r,-180)
t.end_fill()
t.circle(-R,-180)
t.pu()
t.fillcolor('white')
t.begin_fill()
t.goto(0,R/3)
t.circle(yang_circle_r)
t.end_fill()
t.pu()
t.goto(0,-2*R/3)
t.pd()
t.fillcolor('black')
t.begin_fill()
t.circle(yin_circle_r)
t.end_fill()

t.done()
